CES Help Document > Discord Bots > Discord Status Bot with Role Ping

Discord Status Bot with Role Ping

What This Bot Does

The CES Discord Status Bot with Role Ping allows staff to use slash commands to:

  • Update a team's open/closed status
  • Update commission status and lead time
  • Automatically ping the correct role
  • Reuse and edit previous status messages (instead of spamming new ones)

Features

  • ✍️ Slash-based input for updates
  • πŸ”„ Edits previously sent messages using message_map.json
  • πŸ”” Pings specific roles (Team or Commission) based on command used
  • πŸ“‹ Stores default statuses in config.json


Setup Instructions

  1. Edit the .env File

The .env file is already included in the download.

Just open it and update your bot token:

DISCORD_TOKEN=your_actual_token_here

2. Update bot.js Role IDs

In bot.js, update the following lines:

const TEAM_ROLE_ID = "YOUR_TEAM_ROLE_ID";
const COMMISSION_ROLE_ID = "YOUR_COMMISSION_ROLE_ID";

These roles will be pinged during updates.

3. Customize config.json

This file contains the default status values:

{
  "teamStatus": {
    "Management": "Open",
    "Development Team": "Open",
    "Support Team": "Open",
    "Partnerships": "Closed",
    "Testers": "Open",
    "Application Team": "Open"
  },
  "commissionStatus": {
    "EUP Retexture": {
      "status": "Open",
      "leadTime": "7-10 Days"
    },
    "Vehicle Liveries": {
      "status": "Open",
      "leadTime": "3-4 Days"
    },
    "Custom Flags/Billboards": {
      "status": "Open",
      "leadTime": "3 Days"
    },
    "Sonoran CAD Report": {
      "status": "Open",
      "leadTime": "3 Days"
    }
  }
}
  • Feel free to adjust the positions or time estimates.
  • You can freely change these values.

4. message_map.json – Message Tracking

This file stores the last message/channel ID used for each status update, so the bot can edit instead of reposting:

{
  "open_positions": {
    "channelId": "",
    "messageId": ""
  },
  "commission_status": {
    "channelId": "",
    "messageId": ""
  }
}
  • No need to modify it manually β€” it will be updated automatically after first use.

Slash Commands

  • /set_team_status Update any team's status.

Example:

 /set_team_status name:Support Team status:Closed
  • Pings the Team Role.

  • /set_commission_status Update a commission project’s status and lead time.

Example:

/set_commission_status name:Vehicle Liveries status:In Progress lead_time:4-5 Days

  • Pings the Commission Role.

Run the Bot

  1. Install dependencies:

npm install

2. Launch the bot:

node bot.js
  • This will also register your slash commands.

Required Permissions

Step 1: Invite the Bot

If you haven’t already invited the bot, use your custom bot invite URL or generate one with these OAuth2 permissions:

  • applications.commands

  • bot

  • Minimum Bot Permissions:

βœ… Send Messages

βœ… Embed Links

βœ… Read Message History

βœ… Use Slash Commands

βœ… Mention @everyone, @here, and All Roles

βœ… Manage Messages (optional, if using message edits)

βœ… Manage Channels (only if needed to rename channels β€” not required for this bot)


Suggest an edit

Review this page

crazyeyes29